<include file="Public:header" />
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<div id="main-content">
    <div id="top-alert" class="fixed alert alert-error" style="display: none;">
        <button class="close fixed" style="margin-top: 4px;">&times;</button>
        <div class="alert-content">警告内容</div>
    </div>
    <div id="main" class="main">
        <div class="main-title-h">
            <span class="h1-title">担保交易设置</span>
            <span class="h2-title">>><a href="{:U('Duobao/index')}" target="_black">担保交易列表</a></span>
        </div>
        <div class="tab-wrap">

            <div class="tab-content">
                <form id="form" action="{:U('danbaoConfigSave')}" method="post" class="form-horizontal">
                    <div id="tab" class="tab-pane in tab">
                        <div class="form-item cf">
                            <table>
                                <tr class="controls">
                                    <td class="item-label">担保中介费比例 :</td>
                                    <td><input type="text" class="form-control input-10x" name="agency_fee_pay_percent" placeholder="请输入担保交易中介费所占比例" value="{$data['agency_fee_pay_percent']}"></td>
                                    <td class="item-note"></td>
                                </tr>
                                <tr class="controls">
                                    <td class="item-label"></td>
                                    <td>
                                        <div class="form-item cf">
                                            <input type='submit' class="btn submit-btn ajax-post" value='确定' target-form="form-horizontal" id="submit">
                                            <a class="btn btn-return" href="{$Think.server.HTTP_REFERER}">返 回</a>
                                        </div>
                                    </td>
                                </tr>

                            </table>
                        </div>
                    </div>
                </form>
                <script type="text/javascript">
                    //提交表单
                    $('#submit').click(function() {
                        $('#form').submit();
                    });
                </script>
            </div>
        </div>

    </div>
</div>
<include file="Public:footer" />
<block name="script">

    <script type="text/javascript" charset="utf-8">
        $("#form").validate({
            rules: {
                agency_fee_pay_percent: {
                    digits: true,
                    max: 100
                }
            },
            messages: {
                agency_fee_pay_percent: {
                    digits: "担保交易中介费用比例必须是大于0的整数",
                    max: "担保交易中介费用比例必须小于100"
                }
            }
        });
        //导航高亮
        highlight_subnav("{:U('Config/danbaoConfig')}");
    </script>
</block>